package com.campus.common.message;

import java.io.Serializable;
import java.util.List;
import com.campus.common.vo.Classroom;
import com.campus.common.vo.Course;

/**
 * 学生选课/班级操作响应
 * 课程为主，班级为辅
 */
public class StudentCourseResponse implements Serializable {
    private boolean success;          // 操作是否成功
    private String message;           // 提示信息

    // 单个班级（选课 / 退课操作返回）
    private Classroom classroom;

    // 多个班级（课程查询或班级查询返回），可用于组合在课程中
    private List<Classroom> classrooms;

    // 单个课程（查看课程详情返回）
    private Course course;

    // 多个课程（查看可选课程 / 已选课程返回）
    private List<Course> courses;


    // 无参构造

    public StudentCourseResponse() {}


    // 构造器：单个班级操作返回（选课 / 退课）

    public StudentCourseResponse(boolean success, String message, Classroom classroom) {
        this.success = success;
        this.message = message;
        this.classroom = classroom;
    }

    // ----------------------
    // 构造器：班级列表返回
    // ----------------------
    public StudentCourseResponse(boolean success, String message, List<Classroom> classrooms) {
        this.success = success;
        this.message = message;
        this.classrooms = classrooms;
    }


    // 构造器：单个课程返回（课程详情）

    public StudentCourseResponse(boolean success, String message, Course course) {
        this.success = success;
        this.message = message;
        this.course = course;
    }


    // 构造器：多个课程返回（可选 / 已选课程）

    public StudentCourseResponse(boolean success, String message, List<Course> courses, boolean isCourseList) {
        this.success = success;
        this.message = message;
        this.courses = courses;
    }

    // ===== Getter / Setter =====
    public boolean isSuccess() {
        return success;
    }
    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }

    public Classroom getClassroom() {
        return classroom;
    }
    public void setClassroom(Classroom classroom) {
        this.classroom = classroom;
    }

    public List<Classroom> getClassrooms() {
        return classrooms;
    }
    public void setClassrooms(List<Classroom> classrooms) {
        this.classrooms = classrooms;
    }

    public Course getCourse() {
        return course;
    }
    public void setCourse(Course course) {
        this.course = course;
    }

    public List<Course> getCourses() {
        return courses;
    }
    public void setCourses(List<Course> courses) {
        this.courses = courses;
    }
}
